import React from 'react'
import Input from '../common/Input'
import styles from '../../styles/login/loginInput.scss'
import { IconFont } from '../common/config'
import { changeInputDataConfig } from './Login'

interface settingConfig {
    icon: string,
    isPassword: boolean,
    callback?: changeInputDataConfig,
    type: string,
    placeholder?: string
}

export default function LoginInput({ icon, isPassword, type, callback, placeholder }: settingConfig) {
    return (
        <div className={styles.main}>
            <div className={styles.iconSection}>
                <IconFont type={icon} className={styles.icon} />
            </div>
            <Input
                style={{
                    borderTopLeftRadius: 0,
                    borderBottomLeftRadius: 0,
                }}
                isPassword={isPassword}
                type={type}
                callback={callback}
                placeholder={placeholder}
            />
        </div>
    )
}
